package com.um.jdy.platform.alarm.controller;



import com.um.jdy.common.alarm.entity.dto.AlarmCodeDTO;
import com.um.jdy.common.alarm.entity.po.AlarmCode;
import com.um.jdy.common.alarm.entity.vo.AlarmCodeVO;
import com.um.jdy.common.alarm.service.AlarmCodeService;
import com.um.jdy.platform.alarm.entity.dto.AlarmCodeListDTO;
import com.um.jdy.platform.alarm.entity.dto.AlarmCodePageDTO;
import com.um.jdy.platform.alarm.manager.AlarmCodeManager;
import com.um.springboot.starter.annotation.ApiPermission;
import com.um.springboot.starter.annotation.LoginRequired;
import com.um.springboot.starter.entity.Page;
import com.um.springboot.starter.orm.controller.BasePlusController;
import com.um.springboot.starter.orm.entity.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 控制器：告警代码表
 */
@RestController
@RequestMapping("/api/v1/cms/alarm/code")
@Api(tags = "告警码管理", description = "告警码管理")
@ApiPermission("alarm_code")
@LoginRequired
public class AlarmCodeController extends BasePlusController<AlarmCodeManager, AlarmCodeService, AlarmCode, AlarmCodeDTO, AlarmCodeVO, AlarmCodePageDTO, AlarmCodeListDTO> {

    /**
     * 查询分页
     * @param params
     * @return
     */
    @ApiPermission("page")
    @ApiOperation(value = "分页告警码")
    @PostMapping("/get_page")
    public Response<Page<AlarmCode>> getRecordPage(@RequestBody AlarmCodePageDTO params){
        return manager.page(params);
    }

}



